home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 53 / IOPROG_53.ISO / soft / c++ / xceedbkp.exe / Recovery Wizard / Sources / frmOne.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-02  |  7.5 KB  |  241 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOne 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Xceed Recovery Wizard"
  5.    ClientHeight    =   4290
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   7425
  9.    Icon            =   "frmOne.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    ScaleHeight     =   4290
  13.    ScaleMode       =   0  'User
  14.    ScaleWidth      =   7494.262
  15.    Begin VB.CommandButton cmdTemp 
  16.       Caption         =   "Restore"
  17.       Enabled         =   0   'False
  18.       Height          =   375
  19.       Left            =   4560
  20.       TabIndex        =   10
  21.       Top             =   3720
  22.       Width           =   1215
  23.    End
  24.    Begin VB.CommandButton cmdBrowseCatalogs 
  25.       BackColor       =   &H00000000&
  26.       Caption         =   "..."
  27.       Height          =   255
  28.       Left            =   6840
  29.       TabIndex        =   2
  30.       Top             =   1560
  31.       Width           =   375
  32.    End
  33.    Begin VB.CheckBox chkNoCatalogs 
  34.       Caption         =   "Check this box if you no longer have the Catalogs"
  35.       Height          =   255
  36.       Left            =   1920
  37.       TabIndex        =   3
  38.       Top             =   1920
  39.       Width           =   3975
  40.    End
  41.    Begin VB.TextBox txtCatalogs 
  42.       Height          =   285
  43.       Left            =   1920
  44.       TabIndex        =   1
  45.       Top             =   1560
  46.       Width           =   4815
  47.    End
  48.    Begin VB.TextBox txtBackupSet 
  49.       Height          =   285
  50.       Left            =   1920
  51.       TabIndex        =   0
  52.       Top             =   840
  53.       Width           =   4815
  54.    End
  55.    Begin VB.CommandButton cmdCancel 
  56.       Caption         =   "Cancel"
  57.       Height          =   375
  58.       Left            =   6000
  59.       TabIndex        =   6
  60.       Top             =   3720
  61.       Width           =   1215
  62.    End
  63.    Begin VB.CommandButton cmdNext 
  64.       Caption         =   "Next  >"
  65.       Height          =   375
  66.       Left            =   3120
  67.       TabIndex        =   4
  68.       Top             =   3720
  69.       Width           =   1215
  70.    End
  71.    Begin VB.CommandButton cmdPrev 
  72.       Caption         =   "<  Previous"
  73.       Height          =   375
  74.       Left            =   1920
  75.       TabIndex        =   5
  76.       Top             =   3720
  77.       Width           =   1215
  78.    End
  79.    Begin VB.Line Line1 
  80.       BorderColor     =   &H80000011&
  81.       Index           =   0
  82.       X1              =   1695.672
  83.       X2              =   1695.672
  84.       Y1              =   120
  85.       Y2              =   4080
  86.    End
  87.    Begin VB.Line Line1 
  88.       BorderColor     =   &H80000009&
  89.       Index           =   1
  90.       X1              =   1710.811
  91.       X2              =   1710.811
  92.       Y1              =   120
  93.       Y2              =   4080
  94.    End
  95.    Begin VB.Label Label3 
  96.       Caption         =   "Step 1 of 4"
  97.       BeginProperty Font 
  98.          Name            =   "MS Sans Serif"
  99.          Size            =   8.25
  100.          Charset         =   0
  101.          Weight          =   700
  102.          Underline       =   0   'False
  103.          Italic          =   0   'False
  104.          Strikethrough   =   0   'False
  105.       EndProperty
  106.       Height          =   255
  107.       Left            =   120
  108.       TabIndex        =   11
  109.       Top             =   3840
  110.       Width           =   975
  111.    End
  112.    Begin VB.Image Image1 
  113.       Height          =   1260
  114.       Left            =   120
  115.       Picture         =   "frmOne.frx":0BC2
  116.       Top             =   120
  117.       Width           =   1410
  118.    End
  119.    Begin VB.Label Label2 
  120.       Caption         =   "Where are the catalogs files located?"
  121.       Height          =   255
  122.       Left            =   1920
  123.       TabIndex        =   9
  124.       Top             =   1320
  125.       Width           =   3135
  126.    End
  127.    Begin VB.Label Label1 
  128.       Caption         =   "Enter the name of the Backup set to restore files from."
  129.       Height          =   255
  130.       Left            =   1920
  131.       TabIndex        =   8
  132.       Top             =   600
  133.       Width           =   3975
  134.    End
  135.    Begin VB.Label lblOne 
  136.       Caption         =   "Backup set selection"
  137.       BeginProperty Font 
  138.          Name            =   "MS Sans Serif"
  139.          Size            =   8.25
  140.          Charset         =   0
  141.          Weight          =   700
  142.          Underline       =   -1  'True
  143.          Italic          =   0   'False
  144.          Strikethrough   =   0   'False
  145.       EndProperty
  146.       Height          =   255
  147.       Left            =   1920
  148.       TabIndex        =   7
  149.       Top             =   120
  150.       Width           =   2895
  151.    End
  152. Attribute VB_Name = "frmOne"
  153. Attribute VB_GlobalNameSpace = False
  154. Attribute VB_Creatable = False
  155. Attribute VB_PredeclaredId = True
  156. Attribute VB_Exposed = False
  157. Option Explicit
  158. Dim xClass As clsXceed
  159. Dim ExitInc As Integer
  160. Public Function ShowForm(xObjects As clsXceed) As Integer
  161.     'This is where you will fill in the fields on your forms with the values
  162.     'in xObjects.
  163.     txtBackupSet.Text = xObjects.xRestore.BackupSetName
  164.     txtCatalogs.Text = xObjects.xMain.CatalogFolder
  165.     Set xClass = xObjects
  166.     Me.Left = xClass.PositionLeft
  167.     Me.Top = xClass.PositionTop
  168.     Me.Show vbModal
  169.     xClass.PositionLeft = Me.Left
  170.     xClass.PositionTop = Me.Top
  171.     Set xClass = Nothing
  172.     'At this point, the form is now hidden and ExitInc contains the increment.
  173.     'If ExitInc is not 0 then set xObjects to the field values.
  174.     If ExitInc <> 0 Then
  175.         xObjects.xRestore.BackupSetName = txtBackupSet.Text
  176.         xObjects.xMain.CatalogFolder = txtCatalogs.Text
  177.     End If
  178.         
  179.     ShowForm = ExitInc
  180. End Function
  181. Private Sub chkNoCatalogs_Click()
  182.     If chkNoCatalogs.Value = vbChecked Then
  183.        txtCatalogs.Enabled = False
  184.        cmdBrowseCatalogs.Enabled = False
  185.        txtCatalogs.BackColor = &H8000000B
  186.     Else
  187.        txtCatalogs.Enabled = True
  188.        txtCatalogs.BackColor = &H80000005
  189.        cmdBrowseCatalogs.Enabled = True
  190.     End If
  191. End Sub
  192. Private Sub cmdBrowseCatalogs_Click()
  193.     Dim sFolder As String
  194.     Dim bFolderSelected As Boolean
  195.     bFolderSelected = BrowseForFolder(sFolder, "", Me.hwnd)
  196.         
  197.     If bFolderSelected Then
  198.         txtCatalogs.Text = sFolder
  199.     End If
  200. End Sub
  201. Private Sub cmdCancel_Click()
  202.     Dim xResult As VbMsgBoxResult
  203.     xResult = MsgBox("Your backups have not yet been restored. Cancel anyway?", vbYesNo + vbQuestion)
  204.     If xResult = vbYes Then
  205.         ExitInc = 0
  206.         Me.Hide
  207.     End If
  208. End Sub
  209. Private Sub cmdNext_Click()
  210.     Dim Answer As VbMsgBoxResult
  211.     If txtBackupSet.Text = "" Then
  212.         Answer = MsgBox("You must specify a backup set name before proceeding.", vbOKOnly + vbInformation)
  213.     Else
  214.         If chkNoCatalogs.Value = vbChecked Then
  215.             If frmTwo.ShowForm(xClass) = 1 Then
  216.                 Unload frmTwo
  217.                 txtCatalogs.Text = xClass.xMain.CatalogFolder
  218.                 chkNoCatalogs.Value = vbUnchecked
  219.                 ExitInc = 1
  220.                 Me.Hide
  221.             Else
  222.                 Unload frmTwo
  223.             End If
  224.         Else
  225.             ExitInc = 1
  226.             Me.Hide
  227.         End If
  228.     End If
  229.         
  230. End Sub
  231. Private Sub cmdPrev_Click()
  232.     ExitInc = -1
  233.     Me.Hide
  234. End Sub
  235. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  236.     If UnloadMode <> vbFormCode Then
  237.         Cancel = True
  238.         Call cmdCancel_Click
  239.     End If
  240. End Sub
  241.